package com.yandadeyu.springBoot.mapper;

import com.yandadeyu.springBoot.model.GoodsInventory;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface GoodsInventoryMapper {
       @Update("update goods set  goods_name=#{goodsName} where id=#{goodsId}")
       void UpdateGoodsInvetory(GoodsInventory goods);

       GoodsInventory QueryGoodsByID(@Param("goodsId")String goodsId);


       @Delete("delete goods from goods where  id=#{goodsId}")
        int  DeleteGoodsByID(@Param("goodsId")int goodsId);

        @Select("select * from   goods  where  id=#{id}")
        GoodsInventory  QueryGoodsByID2(int id);

}
